Skip to content

Conversation

@juzipeek
Copy link

@juzipeek juzipeek commented Jun 3, 2020

add evict call back func in lrucache, when obj been evict, call this func

@rainingmaster
Copy link
Member

@juzipeek
Hi, Thanks for your commit. I think we should update the new methond in README too?

Copy link
Member

@rainingmaster rainingmaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Others is LGTM

@juzipeek juzipeek requested a review from rainingmaster June 19, 2020 15:35
if node.expire >= 0 and node.expire < ngx_now() then
-- print("expired: ", node.expire, " > ", ngx_now())
if self.evict_cb then
pcall(self.evict_cb, key, val)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have a error log while running pcall failed? otherwise use will be confuse why their callback did not run.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, i will add an errlog out put.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants